package com.wellness.commons.message;

public enum  BizMessage implements BaseMessage {

    OK(OK_CODE, OK_MESSAGE),
    REQUEST_BODY_INVALID(1001, "请求体格式错误"), //json格式错误，参数类型错误，日期参数格式错误
    PARAM_INVALID(1002, "参数校验不通过"),  //缺少必要参数，范围超出界限，
    INVALID_TOKEN(1004, "非法的token"),
    UNKOWN_ERROR(1005, "服务错误")
    ;

    BizMessage(int code, String message) {
        this.code = code;
        this.message = message;
    }

    protected int code;
    protected String message;

    @Override
    public int getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
